<template>
    <div id="contianer">
      <iframe
          v-loading="previewLoading"
          id="iframe"
          :src="iframeUrl"
          frameborder="0"
          width="100%"
          height="99.5%"
        ></iframe>
    </div>
  </template>
  <script>
  export default {
    data() {
      return {
          iframeUrl:'',
          previewLoading:false
      };
    },
    created() {
      this.init();
    },
    mounted() {},
    methods: {
      init() {
          this.previewLoading = true
        this.$http({
          url: "/os/model",
          methods: "GET",
        }).then(({ data }) => {
          console.log(data, "看看回显数据");
          this.iframeUrl = data.data +`&toekn=${localStorage.getItem('token')}`
          // this.iframeUrl = 'https://www.baidu.com/'
          this.previewLoading = false
        });
      },
    },
  };
  </script>
  <style lang="scss" scoped>
  #contianer {
    width: 100%;
    height: 100%;
    position: absolute;
  }
  </style>
  